commit | 1339d2e99896ee16c46ba4a3e516b46772892a49 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Thu Jul 11 15:45:03 2024 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Thu Jul 11 15:45:03 2024 +0000 |
tree | ad992311c8e188f2baa7ddd3bb7d0f5a87eba6b7 | |
parent | 6a77a441fefa631949700dbe063969488925388f [diff] | |
parent | 08d3ca4d9b4bea0cd9b8d4d5d2876267fe7272fc [diff] |
Merge "Mark apex-available" into main
Pre-allocated storage for a uniform data type.
To use slab
, first add this to your Cargo.toml
:
[dependencies] slab = "0.4"
Next, add this to your crate:
use slab::Slab; let mut slab = Slab::new(); let hello = slab.insert("hello"); let world = slab.insert("world"); assert_eq!(slab[hello], "hello"); assert_eq!(slab[world], "world"); slab[world] = "earth"; assert_eq!(slab[world], "earth");
See documentation for more details.
This project is licensed under the MIT license.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in slab
by you, shall be licensed as MIT, without any additional terms or conditions.